home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / dflat2.zip / MESSAGE.H < prev    next >
Text File  |  1991-04-19  |  5KB  |  97 lines

  1. /* ----------- message.h ------------ */
  2.  
  3. #ifndef MESSAGES_H
  4. #define MESSGAES_H
  5.  
  6. #define MAXMESSAGES 50
  7. #define DELAYTICKS 1
  8. #define FIRSTDELAY 7
  9. #define DOUBLETICKS 5
  10.  
  11. typedef enum messages {
  12.     /* ------------- process communication messages --------- */
  13.     START,                  /* start message processing       */
  14.     STOP,                   /* stop message processing        */
  15.     COMMAND,                /* send a command to a window     */
  16.     /* ------------- window management messages ------------- */
  17.     CREATE_WINDOW,          /* create a window                */
  18.     SHOW_WINDOW,            /* show a window                  */
  19.     HIDE_WINDOW,            /* hide a window                  */
  20.     CLOSE_WINDOW,           /* delete a window                */
  21.     SETFOCUS,               /* set and clear the focus        */
  22.     PAINT,                  /* paint the window's data space  */
  23.     BORDER,                 /* paint the window's border      */
  24.     TITLE,                  /* display the window's title     */
  25.     MOVE,                   /* move the window                */
  26.     SIZE,                   /* change the window's size       */
  27.     MAXIMIZE,               /* maximize the window            */
  28.     MINIMIZE,               /* minimize the window            */
  29.     RESTORE,                /* restore the window             */
  30.     INSIDE_WINDOW,          /* test x/y inside a window       */
  31.     /* ------------- clock messages ------------------------- */
  32.     CLOCKTICK,              /* the clock ticked               */
  33.     CAPTURE_CLOCK,          /* capture clock into a window    */
  34.     RELEASE_CLOCK,          /* release clock to the system    */
  35.     /* ------------- keyboard and screen messages ----------- */
  36.     KEYBOARD,               /* key was pressed                */
  37.     CAPTURE_KEYBOARD,       /* capture keyboard into a window */
  38.     RELEASE_KEYBOARD,       /* release keyboard to system     */
  39.     KEYBOARD_CURSOR,        /* position the keyboard cursor   */
  40.     CURRENT_KEYBOARD_CURSOR,/* read the cursor position       */
  41.     HIDE_CURSOR,            /* hide the keyboard cursor       */
  42.     SHOW_CURSOR,            /* display the keyboard cursor    */
  43.     SAVE_CURSOR,            /* save the cursor's configuration*/
  44.     RESTORE_CURSOR,         /* restore the saved cursor       */
  45.     SHIFT_CHANGED,          /* the shift status changed       */
  46.     /* ------------- mouse messages ------------------------- */
  47.     MOUSE_INSTALLED,        /* test for mouse installed       */
  48.     RIGHT_BUTTON,           /* right button pressed           */
  49.     LEFT_BUTTON,            /* left button pressed            */
  50.     DOUBLE_CLICK,           /* right button double-clicked    */
  51.     MOUSE_MOVED,            /* mouse changed position         */
  52.     BUTTON_RELEASED,        /* mouse button released          */
  53.     CURRENT_MOUSE_CURSOR,   /* get mouse position             */
  54.     MOUSE_CURSOR,           /* set mouse position             */
  55.     SHOW_MOUSE,             /* make mouse cursor visible      */
  56.     HIDE_MOUSE,             /* hide mouse cursor              */
  57.     WAITMOUSE,              /* wait until button released     */
  58.     TESTMOUSE,              /* test any mouse button pressed  */
  59.     CAPTURE_MOUSE,          /* capture mouse into a window    */
  60.     RELEASE_MOUSE,          /* release the mouse to system    */
  61.     /* ------------- text box messages ---------------------- */
  62.     ADDTEXT,                /* add text to the text box       */
  63.     CLEARTEXT,              /* clear the edit box             */
  64.     SETTEXT,                /* set address of text buffer     */
  65.     SCROLL,                 /* vertical scroll of text box    */
  66.     HORIZSCROLL,            /* horizontal scroll of text box  */
  67.     /* ------------- edit box messages ---------------------- */
  68.     EB_GETTEXT,             /* get text from an edit box      */
  69.     EB_PUTTEXT,             /* put text into an edit box      */
  70.     /* ------------- menubar messages ----------------------- */
  71.     BUILDMENU,              /* build the menu display         */
  72.     SELECTION,              /* menubar selection              */
  73.     /* ------------- popdown messages ----------------------- */
  74.     BUILD_SELECTIONS,       /* build the menu display         */
  75.     CLOSE_POPDOWN,          /* tell parent popdown is closing */
  76.     /* ------------- list box messages ---------------------- */
  77.     LB_SELECTION,           /* sent to parent on selection    */
  78.     LB_CHOOSE,              /* sent when user chooses         */
  79.     LB_CURRENTSELECTION,    /* return the current selection   */
  80.     LB_GETTEXT,             /* return the text of selection   */
  81.     LB_SETSELECTION,        /* sets the listbox selection     */
  82.     /* ------------- dialog box messages -------------------- */
  83.     INITIATE_DIALOG,        /* begin a dialog                 */
  84.     ENTERFOCUS,             /* tell DB control got focus      */
  85.     LEAVEFOCUS,             /* tell DB control lost focus     */
  86.     ENDDIALOG               /* end a dialog                   */
  87. } MESSAGE;
  88.  
  89. /* --------- message prototypes ----------- */
  90. void init_messages(void);
  91. void PostMessage(WINDOW, MESSAGE, PARAM, PARAM);
  92. int SendMessage(WINDOW, MESSAGE, PARAM, PARAM);
  93. int dispatch_message(void);
  94. int TestCriticalError(void);
  95.  
  96. #endif
  97.